package com.rz.htk.order.controller;

import com.rz.core.kit.RespKit;
import com.rz.core.resp.ResultResp;
import com.rz.htk.order.entity.CustomsClearance;
import com.rz.htk.order.entity.vo.OrderDeleteParam;
import com.rz.htk.order.service.CustomsClearanceService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/customs_clearance")
public class CustomsClearanceController {

    @Resource
    private CustomsClearanceService customsClearanceService;

    @PostMapping("/getPage")
    public ResultResp getPage(@RequestBody CustomsClearance customs_clearance){
        return RespKit.success(customsClearanceService.getPage(customs_clearance));
    }

    @PostMapping("/saveProduct")
    public ResultResp saveProduct(@RequestBody CustomsClearance customs_clearance){
        return RespKit.success(customsClearanceService.saveCustomsClearance(customs_clearance));
    }

    @PostMapping("/batchDelete")
    public ResultResp batchDelete(@RequestBody OrderDeleteParam deleteParam){
        return RespKit.success(customsClearanceService.batchDelete(deleteParam));
    }
}
